
#!/usr/bin/env python
# coding=utf-8
# Created by han on 2016/6/6

# if platform.system() == 'Windows':
#     BASE_DIR = '\\'.join(os.path.dirname(__file__).split('/')[:-1])
# else:
#     BASE_DIR = '/'.join(os.path.dirname(__file__).split('/')[:-1])
#     sys.path.append(BASE_DIR)
# from ftp import login

#
# if platform.system() == 'Windows':
#     BASE_DIR = '\\'.join(os.path.dirname(__file__).split('/')[:-1])
# else:
#     BASE_DIR = '/'.join(os.path.dirname(__file__).split('/')[:-1])
#     sys.path.append(BASE_DIR)
#
# a = os.path.exists("db/han")
# print(a)
#
# a = os.getcwd()
# print(a)

# b = time.ctime()
# a = time.ctime()
# a = time.gmtime()
# c = time.localtime()
#
# a = time.mktime(time.localtime())
# a = time.strftime("%Y-%m-%d %H:%M:%S",time.localtime())
#
# a = time.strptime("2016-01-28 23:36","%Y-%m-%d %H:%M")
#
# d = time.strptime("2016-06","%Y-%m")
# b = time.mktime(a)
# a = datetime.date.today()
# a = datetime.date.fromtimestamp(time.time()-864400)
# print(a)
#

# a = {"money":123}
# yue = a["money"]
# pay = 100
# a["money"] = yue - pay
# print(a)

#试试年月日能否加减


# time_obj = time.localtime()
# time_obj = time.localtime()
# print(time_obj)
# a = "{year}-{month}-{day}".format(year=time_obj.tm_year,month=time_obj.tm_mon,day=time_obj.tm_mday)
# print(a)
# from conf import db_conf
# import os
# a = os.listdir(db_conf.T_DB_BASE)
# print(a)


# def next_month(day):
#     local_time = time.localtime()
#     mon = local_time.tm_mon
#     if mon != 12:
#         next_mon = mon+1
#     else:
#         next_mon = 0+1
#     ret = "{mon}-{day}".format(mon=next_mon,day=day)
#     return ret
#
#
# a = next_month(10)
# local_time = time.localtime()
# print(a)
# print(local_time)


# a = {"a":""}
# print(bool(a["a"]))

# a = "2016-7-7"
# b = "2016-7-7"

# c_str_time = time.strptime(a,"%Y-%m-%d")
# d_str_time = time.strptime(b,"%Y-%m-%d")
# c_mk_time = time.mktime(c_str_time)
# d_mk_time  = time.mktime(d_str_time)
#
# def daysdiff(d1, d2):
#     daysec = 24 * 60 * 60
#     return int((d1 - d2) / daysec)
#
# h = daysdiff(d_mk_time,c_mk_time)
# print(h)



# day = public.daysdiff(a,b)
# print(day)


a = {"buy":{"cat":[10,1],"car":[20,1]}}
